package com.nfc.lock.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.nfc.lock.dto.request.RoomAddRequest;
import com.nfc.lock.dto.response.MapRoomVO;
import com.nfc.lock.dto.response.RoomDetailVO;
import com.nfc.lock.entity.PowerRoom;

import java.util.List;

/**
 * Power room service contract.
 */
public interface IPowerRoomService extends IService<PowerRoom> {

    /**
     * Returns paged power room list.
     */
    IPage<RoomDetailVO> getRoomList(Integer pageNum, Integer pageSize, String keyword, Long regionId);

    /**
     * Creates a new power room.
     */
    void addRoom(RoomAddRequest request);

    /**
     * Updates existing power room.
     */
    void updateRoom(Long roomId, RoomAddRequest request);

    /**
     * Deletes a power room.
     */
    void deleteRoom(Long roomId);

    /**
     * Fetches power room detail.
     */
    RoomDetailVO getRoomDetail(Long roomId);

    /**
     * Returns power rooms for map display.
     *
     * @param regionId optional region filter restricted to regions accessible by the current user
     * @param status   optional status filter: 0-normal, 1-open, 2-malfunction
     * @param keyword  optional keyword for searching room name
     */
    List<MapRoomVO> getMapRooms(Long regionId, Integer status, String keyword);
}
